<template>
	<!-- 首页工作人群组件 -->
	<view class="content">

		<div class="item-evel">
			<div class="clearfloat1 item-jt">
				<div class="same" :key="index" v-for="(item, index) in list" @click="goList(item)">
					<image class="myicons" :src="item.icon"></image>
					<view class="name">{{ item.name}}</view>
				</div>

			</div>
		</div>
	</view>
</template>


<script>
	import {
		mapGetters
	} from 'vuex'

	export default {
		data() {
			return {
				list: [{
						id: 1,
						name: "待办事项",
						icon: "../../static/image/icon/a1.png",
					},
					{
						id: 0,
						name: "工资条",
						icon: "../../static/image/icon/a2.png",
					},
					{
						id: 5,
						name: "我的简历",
						icon: "../../static/image/icon/a3.png",
					},
					{
						id: 2,
						name: "五险一金",
						icon: "../../static/image/icon/a4.png",
					},
					{
						id: 3,
						name: "我的发票",
						icon: "../../static/image/icon/a5.png",
					},
					{
						id: 7,
						name: "帮助中心",
						icon: "../../static/image/icon/a6.png",
					},
					// {
					// 	id: 4,
					// 	name: "二手交易",
					// 	icon: "https://recruit-oss.oss-cn-beijing.aliyuncs.com/recruit/img/home/ershoujiaoyi.png",
					// }, 
					// 取消特色农产品

					// {
					// 	id: 6,
					// 	name: "特色农产品",
					// 	icon: "https://recruit-oss.oss-cn-beijing.aliyuncs.com/recruit/img/home/nongchanp.png",
					// }
				],
			};
		},
		computed: {
			...mapGetters(['city']),
		},

		methods: {

			goList(id) {
				console.log(id, "数组44");


				// uni.setStorageSync("city", this.city ? this.city : '全国');
				if (id.id == 0) {
					uni.navigateTo({
						// 首页 二手交易详情组件
						url: "/package/pages/release/Safeguarding",
					});
				}
				//  else if (id.id == 7) {
				// 	uni.navigateTo({
				// 		// 我的/帮助中心
				// 		url: `/package/pages/webView/webView?name=帮助中心&url=https://web.xujiekeji.com/download/help.html`,
				// 	});
				// }
				 else if (id.id == 1) {
					uni.navigateTo({
						url: "/package/pages/searchJob/notice",
					});
				}
				else if (id.id == 5) {
	uni.navigateTo({
						url: '/package/pages/release/jobWanted1',
					});
				
				}
				 // else if (id.id == 6) {
				// 	uni.navigateTo({
				// 		// 首页 特色农产品 详情页组件
				// 		url: `/package/pages/searchJob/other/qianxiangchun`,
				// 	});
				// } else if (id.id == 7) {
				// 	uni.navigateTo({
				// 		// url: `/package/pages/searchJob/collectionForm/collectionForm`,
				// 		// 首页 找工人详情页组件
				// 		url:'/pages/findWorkers/findWorkers'
				// 	});
				// } else {
				// 	uni.navigateTo({
				// 		// 首页 本地找工作详情页组件
				// 		url: "/package/pages/searchJob/list/list?id=" + id.id+"&type="+id.name,
				// 	});
				// }
			},
		},
	};
</script>
<style>
	@import url("/static/fonts/iconfont.css");

	page {
		background: #efefef;
	}
</style>
<style>
	page {
		background: #fff;
	}
</style>
<style lang="scss" scoped>
	.clearfloat1 {
		display: flex;
		flex-wrap: wrap;
		padding-top: 25px;
	}

	.item-evel {
		box-sizing: border-box;
		width: 100%;
		color: #fff;
		background: #fff;
	}

	.item-jt {
		// border: 0;
		// padding: 10px 0;
		// box-sizing: border-box;
		// width: 100%;
		// // margin: 0 auto 5px auto;
		// overflow-x: auto;
		// white-space: nowrap;
	}

	.item-jt>div {
		// display: inline-block;
		// width: 70px;
	}

	.same {
		width: 33.33%;
		margin-bottom: 15px;
		text-align: center;

		.myicons {
			width: 45px;
			height: 45px;
			display: block;
			margin: 0 auto 10px auto;
		}

		.name {
			font-size: 12px;
			font-weight: bold;
			color: #666;
			margin-top: 10 rpx;
		}
	}
</style>
